package com.boco.pciv;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableCaching
@EnableTransactionManagement
@EnableScheduling
public class PcivAdminApplication extends SpringBootServletInitializer {
    //logger
    private static final Logger logger = LoggerFactory.getLogger(PcivAdminApplication.class);

	public static void main(String[] args) {
		SpringApplication.run(PcivAdminApplication.class, args);
        logger.info("website start success!");
	}

	//extend SpringBootServletInitializer 支持war方式部署
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(PcivAdminApplication.class);
	}
}
